﻿namespace Sidvall.IdentityManager.Model
{
    public sealed partial class GenericDataPortal : global::Sidvall.IdentityManager.Model.DataPortalBase
    {
        #region Public Members

        #region AspNetRolesManager

        private global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetRolesManager<global::Sidvall.IdentityManager.Data.IAspNetRoles, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetRoles>> _AspNetRolesManager;
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        public global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetRolesManager<global::Sidvall.IdentityManager.Data.IAspNetRoles, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetRoles>> AspNetRolesManager
        {
            get
            {
                return _AspNetRolesManager;
            }
            private set
            {
                _AspNetRolesManager = value;
            }
        }

        #endregion
        #region AspNetUserClaimsManager

        private global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserClaimsManager<global::Sidvall.IdentityManager.Data.IAspNetUserClaims, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserClaims>> _AspNetUserClaimsManager;
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        public global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserClaimsManager<global::Sidvall.IdentityManager.Data.IAspNetUserClaims, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserClaims>> AspNetUserClaimsManager
        {
            get
            {
                return _AspNetUserClaimsManager;
            }
            private set
            {
                _AspNetUserClaimsManager = value;
            }
        }

        #endregion
        #region AspNetUserLoginsManager

        private global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserLoginsManager<global::Sidvall.IdentityManager.Data.IAspNetUserLogins, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserLogins>> _AspNetUserLoginsManager;
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        public global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserLoginsManager<global::Sidvall.IdentityManager.Data.IAspNetUserLogins, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserLogins>> AspNetUserLoginsManager
        {
            get
            {
                return _AspNetUserLoginsManager;
            }
            private set
            {
                _AspNetUserLoginsManager = value;
            }
        }

        #endregion
        #region AspNetUsersManager

        private global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUsersManager<global::Sidvall.IdentityManager.Data.IAspNetUsers, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUsers>> _AspNetUsersManager;
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        public global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUsersManager<global::Sidvall.IdentityManager.Data.IAspNetUsers, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUsers>> AspNetUsersManager
        {
            get
            {
                return _AspNetUsersManager;
            }
            private set
            {
                _AspNetUsersManager = value;
            }
        }

        #endregion
        
        #endregion
        #region Private Members

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
        private void Init(bool alwaysUseLocalDataPortal)
        {
            this.AspNetRolesManager = new global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetRolesManager<global::Sidvall.IdentityManager.Data.IAspNetRoles, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetRoles>>(this, alwaysUseLocalDataPortal);
            this.AspNetUserClaimsManager = new global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserClaimsManager<global::Sidvall.IdentityManager.Data.IAspNetUserClaims, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserClaims>>(this, alwaysUseLocalDataPortal);
            this.AspNetUserLoginsManager = new global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUserLoginsManager<global::Sidvall.IdentityManager.Data.IAspNetUserLogins, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserLogins>>(this, alwaysUseLocalDataPortal);
            this.AspNetUsersManager = new global::Sidvall.IdentityManager.Model.DataPortalManagers.AspNetUsersManager<global::Sidvall.IdentityManager.Data.IAspNetUsers, Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUsers>>(this, alwaysUseLocalDataPortal);
        }

        #endregion
        #region Constructors

        public GenericDataPortal(global::Sidvall.IdentityManager.Model.IDataPortalManager dataPortalManager, bool alwaysUseLocalDataPortal)
            : base(dataPortalManager)
        {
            Init(alwaysUseLocalDataPortal);
        }
        public GenericDataPortal(global::Sidvall.Business.IDataPortal dataPortal, global::Sidvall.Data.IResourceFactory resourceFactory)
            : base(resourceFactory, dataPortal)
        {
            Init(true);
        }

        #endregion
    }
}